<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="http://pic2.58.com/ui6/my/css/user.css?tmp=12312" rel="stylesheet" type="text/css" media="all" />
<title>用户中心首页</title>
</head>

<body>
	<%@ include file="topbar.jsp"%>
	<div id="container" class="win1000">
		<%@ include file="header.jsp"%>

		<div class="wraper-border"></div>
		<!--wraper border-->
		<div id="wraper" class="clearfix">
			<%@ include file="lmenu.jsp"%>

			<div id="right-con-user" class="right">

				<style>
.mima_a,.mima_b,.mima_c,.mima_d {
	width: 90px;
	height: 6px;
	border: 1px solid #ccc;
	padding: 1px;
	line-height: 1%;
	font-size: 1%;
}

.mima_a p,.mima_b p,.mima_c p,.mima_d p {
	height: 6px;
	padding: 0;
	line-height: 1%;
	font-size: 1%;
}

.mima_a p {
	width: 25%;
	background: #FF3300;
}

.mima_b p {
	width: 50%;
	background: #FF9933;
}

.mima_c p {
	width: 75%;
	background: #B8D96A;
}

.mima_d p {
	width: 100%;
	background: #009933;
}

.fred {
	color: #ff0508;
}

.fgreen {
	color: #009900;
}

.fora {
	color: #FF9933;
}

.flv {
	color: #B8D96A;
}
</style>
				<div class="title clearfix">
					<h2 class="balance-h2">修改密码</h2>
				</div>
				<!--title-->
				<form id="subform" name="subform" method="post" enctype="multipart/form-data" target="formSubmit" action="/submit/updatepassword/">
					<div class="uppwd">
						<dl class="clearfix">
							<dt>您的用户名</dt>

							<dd>
								<strong>amsser_lee</strong>
							</dd>
						</dl>
						<dl class="clearfix">
							<dt>
								<span class="red">*</span>&nbsp;请输入旧密码
							</dt>
							<dd>
								<input type="password" class="inw inp" id="txtOldPwd" name="txtOldPwd"> <span id="txtOldPwd_Tip"></span>
							</dd>

						</dl>
						<dl class="clearfix">
							<dt>
								<span class="red">*</span>&nbsp;请输入新密码
							</dt>
							<dd>
								<input type="password" class="inw inp" id="txtNewPwd1" onkeyup="$.c.user.reg.CheckPasswordStrength(this)" name="txtNewPwd1"> <span id="txtNewPwd1_Tip"> </span>
							</dd>
						</dl>

						<dl class="clearfix">
							<dt>
								<span class="red">*</span>&nbsp;再次输入密码
							</dt>
							<dd>
								<input type="password" class="inw inp" id="txtNewPwd2" name="txtNewPwd2"> <span id="txtNewPwd2_Tip"> </span>
							</dd>
						</dl>
						<dl class="clearfix">

							<dt>&nbsp;</dt>
							<dd>
								<label class="butt" id="butt"> <input type="submit" class="btns" value="完成修改" id="btnSubmit">
								</label>


							</dd>
						</dl>
					</div>
				</form>
				<script id="postScript">
					function isContinuousChar(str) {
						var str = str.toLowerCase();
						var flag = 0;
						for ( var i = 0; i < str.length; i++) {
							if (str.charCodeAt(i) != flag + 1 && flag != 0)
								return false;
							else
								flag = str.charCodeAt(i);
						}
						return true;
					}

					function isSameChar(str) {
						var str = str.toLowerCase();
						var flag = 0;
						for ( var i = 0; i < str.length; i++) {
							if (str.charCodeAt(i) != flag && flag != 0)
								return false;
							else
								flag = str.charCodeAt(i);
						}
						return true;
					}
					$(document)
							.ready(
									function() {
										$.formValidator.initConfig({
											formid : "subform",
											errorfocus : true,
											btnid : 'btnSubmit',
											btnvalue : '完成修改',
											btnactionvalue : '正在提交....'
										});
										$("#txtOldPwd").formValidator({
											onfocus : "请输入旧的密码"
										}).inputValidator({
											onerror : "请填写密码"
										});
										$("#txtNewPwd1")
												.formValidator(
														{
															onfocus : "密码需由6-16个字符（数字、字母、下划线）组成，区分大小写；不能使用重复、连续的字母、数字或下划线"
														})
												.inputValidator({
													onerror : "您还没有输入密码"
												})
												.regexValidator(
														{
															regexp : "^[\\s\\S]{6,}$#^(.){6,16}$",
															onerror : "密码太短，最少为6位。#密码不应超过16个字符。"
														})
												.functionValidator(
														{
															fun : function(val,
																	elem) {
																var pwd = val
																		.toLowerCase();
																if ((isContinuousChar(pwd) || isSameChar(pwd))
																		&& pwd
																				.match("^[a-z|A-Z]+$")) {
																	return "为了您的账户安全，密码不能为重复字母和连续字母";
																}
																if ((isContinuousChar(pwd) || isSameChar(pwd))
																		&& pwd
																				.match("^[\\d]+$")) {
																	return "为了您的账户安全，密码不能为重复数字和连续数字";
																}
																if (pwd
																		.match("^[_]+$")) {
																	return "为了您的账户安全，密码不能全为下划线";
																}

																var msg = $.c.user.reg
																		.checkpwd(val);
																if (msg == "") {
																	return true;
																}
																return msg;
															}
														});

										$("#txtNewPwd2").formValidator({
											onfocus : "请填写密码"
										}).inputValidator({
											onerror : "您两次所输入的密码不一致,请检查"
										}).compareValidator({
											desid : "txtNewPwd1",
											operateor : "=",
											onerror : "您两次所输入的密码不一致,请检查",
											datatype : "string"
										});
									});
				</script>
				<iframe style="display: none" src="/submit.htm" id="formSubmit" name="formSubmit"> </iframe>

				<script>
					var menuid = "xiugaimima";
				</script>
			</div>
			<!--right con-->
		</div>
		<!--wraper-->
		<div class="wraper-border"></div>
		<!--wraper border-->
		<div id="q-yj">
			<a href="http://q.58.com/58TongCheng/topic_712625.shtml" target="_blank">我要提意见</a>
		</div>
	</div>
	<!--container-->
	<div id="footer">

		&copy; 2011 58.com <a target="_blank" href="http://about.58.com/v5/">帮助中心</a>
	</div>
	<script>
		try {
			if (menuid) {
				$("#" + menuid).addClass("open");
			}
		} catch (ex) {
		}
		$(function() {
			$("a[tongji]").each(function(i) {
				$(this).click(function() {
					tongjiClick($(this).attr("tongji"));
				});
			});
			$("a[hisindex]").each(function() {
				$(this).click(function() {
					addHis($(this).attr("hisindex"));
				});
			});
		});
		function addHis(index) {
			// 信息管理和发布不加入cookie
			if (index == 1 || index == 0)
				return;
			var key = "myvisithistory42422160";
			var his = fe.cookie.get(key);
			if (his == null) {
				setMyHisCookie(key, index);
			} else {
				var arr = his.split(',');
				var exist = false;
				for ( var i = 0; i < arr.length; i++) {
					if (arr[i] == index) {
						exist = true;
						break;
					}
				}
				if (!exist) {
					if (arr.length < 6) {
						his = index + "," + his;
						setMyHisCookie(key, his);
					} else {
						arr.pop();
						var arrtmp = arr.reverse();
						arr.push(index);
						arrtmp = arrtmp.reverse();
						his = arrtmp.join(',');
						setMyHisCookie(key, his);
					}
				}
			}
		}
		function setMyHisCookie(key, his) {
			var now = new Date;
			var d = new Date(now.getFullYear(), now.getMonth() + 1, now
					.getUTCDate());
			fe.cookie.set(key, his, d, "/", "my.58.com");
		}
		function tongjiClick(key) {
			_gaq.push([ 'pageTracker._trackEvent', '58_my', 'menu', key ]);
		}
	</script>

	<div style="display: none">
		<script type="text/javascript">
			var _gaq = _gaq || [];
			var site_name = "58";
			_gaq.push([ 'pageTracker._setAccount', 'UA-877409-4' ]);
			_gaq.push([ 'pageTracker._setDomainName', '.58.com' ]);
			_gaq.push([ 'pageTracker._setAllowLinker', true ]);
			_gaq.push([ 'pageTracker._addOrganic', 'sogou', 'query' ]);
			_gaq.push([ 'pageTracker._addOrganic', 'baidu', 'word' ]);
			_gaq.push([ 'pageTracker._addOrganic', 'soso', 'w' ]);
			_gaq.push([ 'pageTracker._addOrganic', 'youdao', 'q' ]);
			_gaq.push([ 'pageTracker._trackPageview' ]);
			(function() {
				var ga = document.createElement('script');
				ga.type = 'text/javascript';
				ga.async = true;
				ga.src = ('https:' == document.location.protocol ? 'https://ssl'
						: 'http://www')
						+ '.google-analytics.com/ga.js';
				var s = document.getElementsByTagName('script')[0];
				s.parentNode.insertBefore(ga, s);
			})();
		</script>
		<script type="text/javascript" src="http://track.58.com/referrer2.js"></script>
	</div>
</body>

</html>